1  ' CHAOS.BAS
10 KEY OFF: CLS
20 SCREEN 2
30 DEFSNG A-Z
40 COLUMNS = 640
50 ROWS = 200
60 START = 1
70 FINISH = 3.999
80 TOP = 0
90 BOTTOM = 1
100 MAXREPS = 10
110 HEIGHT = BOTTOM - TOP
120 VPCT = 1 / HEIGHT
130 FOR R = START TO FINISH STEP ((FINISH - START) / COLUMNS)
140 X = .1
150 FOR I = 1 TO 100
160 X = R * (X - X * X)
170 NEXT I
180 FOR I = 1 TO 30
190 X = R * (X - X * X)
200 XPOS = (R - START) * COLUMNS / (FINISH - START)
210 YPOS = ROWS - (X - TOP) * ROWS * VPCT
220 PSET (XPOS, YPOS)
230 NEXT I
240 NEXT R
250 A$ = INPUT$(1)
